package com.ruoyi.config.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.config.mapper.ZfbpayConfigMapper;
import com.ruoyi.config.domain.ZfbpayConfig;
import com.ruoyi.config.service.IZfbpayConfigService;

/**
 * 支付宝支付配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-16
 */
@Service
public class ZfbpayConfigServiceImpl implements IZfbpayConfigService 
{
    @Autowired
    private ZfbpayConfigMapper zfbpayConfigMapper;

    /**
     * 查询支付宝支付配置
     * 
     * @param id 支付宝支付配置主键
     * @return 支付宝支付配置
     */
    @Override
    public ZfbpayConfig selectZfbpayConfigById(Long id)
    {
        return zfbpayConfigMapper.selectZfbpayConfigById(id);
    }

    /**
     * 查询支付宝支付配置列表
     * 
     * @param zfbpayConfig 支付宝支付配置
     * @return 支付宝支付配置
     */
    @Override
    public List<ZfbpayConfig> selectZfbpayConfigList(ZfbpayConfig zfbpayConfig)
    {
        return zfbpayConfigMapper.selectZfbpayConfigList(zfbpayConfig);
    }

    /**
     * 新增支付宝支付配置
     * 
     * @param zfbpayConfig 支付宝支付配置
     * @return 结果
     */
    @Override
    public int insertZfbpayConfig(ZfbpayConfig zfbpayConfig)
    {
        zfbpayConfig.setCreateTime(DateUtils.getNowDate());
        return zfbpayConfigMapper.insertZfbpayConfig(zfbpayConfig);
    }

    /**
     * 修改支付宝支付配置
     * 
     * @param zfbpayConfig 支付宝支付配置
     * @return 结果
     */
    @Override
    public int updateZfbpayConfig(ZfbpayConfig zfbpayConfig)
    {
        zfbpayConfig.setUpdateTime(DateUtils.getNowDate());
        return zfbpayConfigMapper.updateZfbpayConfig(zfbpayConfig);
    }

    /**
     * 批量删除支付宝支付配置
     * 
     * @param ids 需要删除的支付宝支付配置主键
     * @return 结果
     */
    @Override
    public int deleteZfbpayConfigByIds(Long[] ids)
    {
        return zfbpayConfigMapper.deleteZfbpayConfigByIds(ids);
    }

    /**
     * 删除支付宝支付配置信息
     * 
     * @param id 支付宝支付配置主键
     * @return 结果
     */
    @Override
    public int deleteZfbpayConfigById(Long id)
    {
        return zfbpayConfigMapper.deleteZfbpayConfigById(id);
    }
}
